An increasing number of products are incorporating microprocessors. Much of the development cost of these products is related to the testing and debugging of the programs executed by the microprocessor. Also, the performance of the resulting product may depend heavily upon the various design choices made and the skill employed in writing those programs. That programming may be in the form of firmware or software; as far as the description below is concerned the difference is moot, and such programming will hereinafter be referred to simply as software.
Any new product that relies heavily on software to accomplish its intended function goes through a development cycle during which designers depend on a variety of measurement tools (e.g., emulators, timing analyzers, logic state analyzers and the like) to test, debug, and analyze the product's performance. The instant invention is an additional measurement tool that aids designers in nearly every phase of the software development cycle. It can be used for software characterization, testing debugging, and optimization, and can characterize software nonintrusively as that software executes in real time.
Traditionally, program performance has been measured in one of two ways: through in-program "hooks," which print out a short message every time the block of code in which they reside is executed, or by custom designed monitoring programs, which oversee the execution of the target code and measure the duration of execution. The main drawback of both traditional methods is that they are intrusive and affect real-time operation. In-program hooks lengthen the program under test and must be removed if the finished code is to fit in a restricted memory space. Once removed, however, they are no longer available to monitor code execution. Therefore, for every debugging effort the hooks must be regenerated; a difficult and costly task. Similarly, program monitors, whether they be line-by-line tracers or event timers, add their own execution time to that of the program. As a consequence, they are not well suited to situations that require real detective work across a wide spectrum of module interaction. A further disadvantage of these traditional methods is that they must be specifically tailored to each measurement to be performed, a time consuming and possibly error prone programming task in itself.
Traditional methods suffered another disadvantage in that they are not well suited to debugging or analyzing programs written in high level languages such as C and PASCAL. The programmer must do several hierarchy translations to bridge the gap between the language in which the program is designed and the raw state flow level in which the analyzer is operated. The result is that the programmer has to think through the testing and debugging procedure in a different context from that in which the basic program was conceptualized and implemented.
In contrast, the software debugging analyzer disclosed herein performs real-time nonintrusive measurements. It greatly reduces the mismatch between the analyses and debugging capabilities of the measurement system and the level at which the program to be analyzed was conceptualized and implemented.
The debugging analyzer disclosed herein provides increases in the automation of software testing and debugging at three levels: automation of the software hierarchy translation; automation of the basic test and debug measurements; and automation of a series or sequence of measurements.
Data collection parameters are entered quickly and easily with directed-syntax softkeys. Symbols and labels generated in program assembly or compilation can be used directly in defining measurements. Measurement configurations are flexible, meeting a variety of application requirements. The debugging analyzer includes basic performance measurement capabilities, providing for testing of module/program timing and code execution specifications. These performance measurement capabilities are fundamental to aid the user's verification and validation activities for improved software reliability, as well as in the basic debug process. Timing measurements provide important improvements in the debug effort, opening up a third dimension to the user to provide a more comprehensive picture of the system being analyzed. Also, the performance metrics of the analyzer allow the user to accomplish performance analysis and code optimization activities. (E.g., not meeting a timing, occurrence, or space specification is a bug.) The software code and data measurement capabilities provide significant improvements to programmer productivity over present debug and analysis packages. All these measurements can be accessed via a highly leveraged automatic test management capability. And of extreme importance to improved accuracy and reduced uncertainty of these measurements, is the non-intrusive and real-time implementation of this instrumentation. These resources are presented to the user in an easy-to-use implementation, which is in alignment with the way software solutions are conceptualized, designed, implemented and maintained.
These and other aspects of the invention are achieved by a hybrid design with an optimized balance between hardware and software implementation, using hardware to provide real-time data acquisition, speed and nonintrusive measurement, and software to provide a flexible feature set.